import Vue from 'vue'
import Router from 'vue-router'
import Chat from '@/components/Chat.vue'
import Dashboard from '@/components/Dashboard.vue'
import Logon from '@/components/Logon.vue'
import Drip from '@/components/drip.vue'
import AlarmRpt from '@/components/alarmrpt.vue'
import Logout from '@/components/Logout.vue' // 新增的组件导入
import Yth from '@/components/yth.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/dashboard',
      name: 'Dashboard',
      component: Dashboard,
      meta: { showMenu: true, showSidebar: true }
    },
    {
      path: '/chat',
      name: 'Chat',
      component: Chat,
      meta: { showMenu: true, showSidebar: true }
    },
    {
      path: '/logon',
      name: 'Logon',
      component: Logon,
      meta: { showMenu: false, showSidebar: false } // 隐藏顶部菜单和左侧树形菜单
    },
    {
      path: '/drip',
      name: 'Drip',
      component: Drip,
      meta: { showMenu: true, showSidebar: true }
    },
    {
      path: '/alarmrpt',
      name: 'AlarmRpt',
      component: AlarmRpt,
      meta: { showMenu: true, showSidebar: true }
    },
    {
      path: '/logout', // 新增的路由
      name: 'Logout',
      component: Logout,
      meta: { showMenu: true, showSidebar: false } // 配置元信息
    },
    {
      path: '/yth',
      name: 'Yth',
      component: Yth,
      meta: { showMenu: true, showSidebar: true }
    }
  ]
})
